//#ifndef _LOCATOR_CELL_H_
//#define _LOCATOR_CELL_H_
#pragma once

#include <vector>

#define ___GEOMETRY_MATH_
#include <MAP_OBJECT.h>
#include <segment.h>
#include <cell.h>

struct locator_cell_t : cell_t
{
	locator_cell_t();
	locator_cell_t(point_t const & center);

	int get_parent(segment_t const & seg) const;
	int get_parent() const;
	void set_center_parent(int parent);

	friend class locator_cell_inserter;

private:
	//std::vector<MAP_OBJECT const *> objs_; 
	//MAP_OBJECT const * center_obj_;

	std::vector<int> idxs_;
	int center_idx_;
};

struct locator_cell_inserter : inserter
{
	locator_cell_inserter(int idx);
	void operator() (locator_cell_t & cell, segment_t const & segment) const;

private:
	//MAP_OBJECT const * obj_;
	int idx_;
};

//#endif